#ifndef FILE_H
#define FILE_H

#include <string>

/**
 * File is a helper static class that allows the user deal with 
 * files.
 */
class File
{
  public:

    /**
      * Created to use it like a filter in some functions.
      * You can do a multiple selection with | operator.
      * For example (Files | ShowDotFiles) shows only files and
      * hidden files, never directories.
      */
    typedef enum
    {
      None = 0,
      Directories = 1,
      Files = 2,
      ShowDotFiles = 4
    } FileTypes;

    /**
     * Destructor. Doesn't do much really.
     */
    ~File();

    /**
     * Given a file path, returns true if the path correspond to a 
     * existing readable file, else it returns false.
     */
    static bool exists(const std::string& filePath);

    /**
     * Returns the filetype of a file specied by its file path using the
     * flags defined in @ref FileTypes.
     */
    static int fileType(const std::string& filePath);

    /**
     * This is a helper constant which contains the separator character
     * used depending on the system it's compiled for. In Linux Separator is
     * '/', in Windows the Separator is "\".
     */
    static const char Separator;

  protected:
    /**
     * Constructor hidden as this is a static class.
     */
    File();
};

#endif
